import base from "./base"; // 导入接口域名列表
import axios from "../http"; // 导入http中创建的axios实例
import qs from "qs"; // 根据需求是否导入qs模块

const getIndex = {
  getIndexData(params) {
    return axios.post(
      `${base.bd}/admin/statistics/index`,
      qs.stringify(params)
    );
  },
  updateIndexData(params) {
    return axios.post(
      `${base.bd}/admin/statistics/all_math`,
      qs.stringify(params)
    );
  },
  getpaihang(params) {
    return axios.post(
      `${base.bd}/mobile/plugin_finger/month_red`,
      qs.stringify(params)
    );
  },
  getIndex_limits(params) {
    return axios.post(
      `${base.bd}/admin/login/plugin_open_all`,
      qs.stringify(params)
    );
  },

  getIndexNew(params) {
    return axios.post(
      `${base.bd}/admin/statistics_new/index`,
      qs.stringify(params)
    );
  },
  refreshIndexNew(params) {
    return axios.post(
      `${base.bd}/admin/statistics_new/all_math`,
      qs.stringify(params)
    );
  },

  getIndexNewV3(params) {
    return axios.post(
      `${base.bd}/admin/statistics/index`,
      qs.stringify(params)
    );
  },
  refreshIndexNewV3(params) {
    return axios.post(
      `${base.bd}/admin/statistics/all_math`,
      qs.stringify(params)
    );
  },
};
export default getIndex;
